@model string
@using NITASA.ViewModels
@{
    CL_WidgetOption wOption = NITASA.Helpers.Functions.ParseJson<CL_WidgetOption>(Model);
    List<CL_Category> Categories = NITASA.Helpers.Functions.GetCategories(wOption.Count);
}

<div class="sidebar-box">
    <h4>@wOption.Title</h4>
    <div class="cat-list">
        <ul>
            @foreach (var item in Categories)
            {
                <li><a href="@(string.IsNullOrEmpty(item.URL) ? "#" : "/Category/" + item.URL)">@item.Name</a></li>
            }
        </ul>
    </div>
</div>